class UserMailer < ActionMailer::Base
  default :from => configatron.email_from

  def order_alert(order)
    @order = order

    mail(:to => configatron.orders_to, :subject => '[Web] Nuevo pedido recibido')
  end

  def order_received(order)
    @order = order

    mail(:to => order.client.email, :subject => 'Hemos recibido su pedido')
  end

  def contact_email(email_from, email_to, subject, body)
    @email_body = body

    mail(:from => email_from, :to => email_to, :subject => subject)
  end
end
